package main

import "fmt"

func main() {
	list := []int{1, 2, 3}
	fmt.Println(list)
	change(list)
	fmt.Println(list)
	fmt.Println("===========")
	change2(&list)
}
func change(list []int) {
	for k, v := range list {
		fmt.Println(v)
		list[k] = v+1
	}
}
func change2(list *[]int)  {
	//会报错
	//list[0] = 1
	fmt.Println(list)
}
